package 工厂模式;

public class Factory {
    public Phone createPhone(String phoneName){
        if ("MI".equals(phoneName)){
            return new MIPhone();
        }else if("I".equals(phoneName)){
            return new IPhone();
        }else {
            return null;
        }
    }
}
